<template>
    <div class="find-dir">
        <el-button class="upload-btn" @click="findDirClick" size="mini">查找文件夹</el-button>
        <input ref="upload-input" class="upload-input" type="file"
               webkitdirectory directory multiple
               @change="handleUploadChange">
    </div>
</template>

<script type="text/ecmascript-6">
    /**
     * @author 白雨浓
     * @date 2018/9/28 10:45
     *
     * 文件夹选择
     **/
    export default {
        name: 'VideoAutoMoveFindDir',
        data() {
            return {}
        },
        mounted() {
            this.$nextTick(() => {

            })
        },
        methods: {
            findDirClick() {
                this.$refs['upload-input'].click();
            },
            handleUploadChange(evt) {
                this.$emit('change', evt);
            }
        }
    }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
    .find-dir {
    }

    .upload-btn {
        margin-left 5px
    }

    .upload-input {
        display none
    }
</style>
